const webpack = require('webpack')
module.exports = {
    lintOnSave: false,
    chainWebpack: (config) => {
        config.plugin('provide').use(webpack.ProvidePlugin, [{
            $: 'jquery',
            jquery: 'jquery',
            jQuery: 'jquery',
            'window.jQuery': 'jquery'
        }])
    },
    css: {
        sourceMap: true
    },
    // 配置跨域请求
    devServer: {
        port: 8083,
        host: 'localhost',
        open: true,
        https: true,
        proxy: {
            '/officialwebsite': {
                target: 'http://localhost:8088/',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    '^/officialwebsite': '/'
                }
            }
        }

    }
}
